/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Bai2;

import java.io.File;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.filechooser.FileView;

/**
 *
 * @author Thu
 */
public class MyFileView extends FileView{


                            @Override
                            public Icon getIcon(File f) {
                               String s=f.getName();
                               if(s.endsWith(".aiff")||s.endsWith(".mp3")||s.endsWith(".au")||s.endsWith(".wav"))
                               {

                                   ImageIcon ico=new ImageIcon("Images/audio.png");
                                   return ico;
                               }
                               else
                               {
                                   ImageIcon ico2=new ImageIcon("Images/movie.png");
                                   return ico2;
                               }

}

}